package com.example.automanagement.service.serviceImpl;

import com.example.automanagement.entity.AutoDepartmentApproval;
import com.example.automanagement.entity.AutoGeneralApproval;
import com.example.automanagement.mapper.AutoApprovalMapper;
import com.example.automanagement.mapper.AutoStatusMapper;
import com.example.automanagement.mapper.DriverStatusMapper;
import com.example.automanagement.service.AutoApprovalService;
import com.example.automanagement.views.AutoArchiveStatus;
import com.example.automanagement.views.DriverArchiveStatus;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AutoApprovalServiceImpl implements AutoApprovalService {
    @Resource
    AutoApprovalMapper autoApprovalMapper;
    @Resource
    AutoStatusMapper autoStatusMapper;
    @Resource
    DriverStatusMapper driverStatusMapper;
    @Override
    public void addAutoDepartmentApproval(AutoDepartmentApproval approval) {
        autoApprovalMapper.addAutoDepartmentApproval(approval);
    }

    @Override
    public void addAutoGeneralApproval(AutoGeneralApproval approval) {
        autoApprovalMapper.addAutoGeneralApproval(approval);
    }

    @Override
    public List<AutoArchiveStatus> getFreePlateNum(String autoType) {
        return autoApprovalMapper.getFreePlateNum(autoType);
    }

    @Override
    public List<DriverArchiveStatus> getFreeDrivers() {
        return autoApprovalMapper.getFreeDrivers();
    }

    @Override
    public AutoGeneralApproval getAutoGeneralApproval(String orderId) {
        return autoApprovalMapper.getAutoGeneralApproval(orderId);
    }

    @Override
    public AutoDepartmentApproval getAutoDepartmentApproval(String orderId) {
        return autoApprovalMapper.getAutoDepartmentApproval(orderId);
    }
}
